This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 11-103889, filed Apr. 12, 1999, the entire contents of which are incorporated herein by reference.
The present invention relates to an image recording device which records image data on a record medium and to electronic camera devices in which the image recording device is used.
In general, in electronic cameras, the image data of the subject that is obtained by photographically shooting the subject is recorded as a file on a record medium such as a memory card(s). Since the memory capacity of the record medium is limited, the image data is usually recorded after compression, thus increasing the number of photographic shots that may be performed with the electronic camera before the recording medium is full over the number of photographic shots that could have been performed if compression was not used. Currently image compression methods mainly use the DCT (Discrete Cosine Transform) method. For example, JPEG (Joint Photographic Coding Experts Group) is such an image compression method using DCT. The entire image may be divided into small blocks, such as 8xc3x978 size small blocks, and the DCT method of performing orthogonal transformations for each block may be used. In this method, the amount of data representing the image can be decreased by performing quantization and variable length encoding for every block transformed into the frequency domain by the orthogonal transformation.
Recently, the image compression method of using wavelet transform has begun to gain attention as a new image compression method that can take the place of DCT. The image compression method of using the wavelet transform is a hierarchical encoding method of encoding the image data by dividing each frequency component and obtaining a plurality of image information each with a different resolution as a result. The wavelet transform method can unitedly obtain the image information of a low resolution, a standard resolution, and a high resolution. Since this method is a method of encoding each frequency component, even when all of the frequency components are not used in the encoded data, the image can be restored using only the low resolution image information on the low frequency side whose frequency component is low. In other words, the amount of data can be reduced by ignoring the high resolution image information on the high frequency side. The image compression method of using the wavelet transform, also has merit in that the block noise and the Mosquito noise characteristics can be decreased compared with the image compression method using DCT. The image compression method of using such a wavelet transform is currently planned for use in the JPEG 2000 standard, and early use of the planned JPEG 2000 standard is hoped for in electronic cameras.
However, the writing sequence of the image data used with a conventional electronic camera is not sufficient to make the best use of the characteristic of the image compression method of using the wavelet transform. The reasons are as follows.
The compressed image data is conventionally recorded on the record medium as a file in the following writing order.
(1) All the compressed image data is written.
(2) The file allocation table (FAT) used to manage the linkage of data for the management data unit, which is called a cluster, is updated.
(3) Writing to directory entry, which is file management information of recorded image data, is performed and the recorded image data is fixed to be able to be used as a file. In this specification, to xe2x80x9cfixxe2x80x9d means to be able to use recorded image data as the file as mentioned-above.
As described above, the reason why the directory entry is written at the end and the file is fixed is to prevent useless data from remaining as a file if writing is interrupted by, for example, death of the battery during the writing of the image data. In a case of the image compression method using DCT, since the original image cannot be restored if all the encoded data is not recorded and available, there is no disadvantage in using this conventional writing method. However, when a hierarchical encoding method such as the wavelet transform is used, there is a possibility that valid encoded data, which has completed writing, will be lost and inaccessible if the conventional writing method is used. That is, since the image compression method by using the hierarchical encoding method such as the wavelet transform encodes each image frequency, the original image could be restored to some degree using only the encoded data of the lower frequency side even if all the encoded data has not been completely recorded, provided other writing methods were employed.
An object of the present invention is to provide an optimal image recording device and an electronic camera device including the image recording device which records image data which is hierarchically encoded, validates, and uses written data as a file even when the writing operation is interrupted by the death of the battery before the entire writing data is completed.
An image recording device of the present invention is characterized by comprising encoding means to hierarchically encode image data; and record means which repeatedly records the image data, which is hierarchically encoded, on a record medium while fixing it for each cluster of a predetermined unit as a file.
The image data, which is hierarchically encoded, is recorded while fixing it as a file for each predetermined cluster. Therefore, even when the writing operation is interrupted while writing by the death of the battery, it becomes possible to leave the already written data as a useful file. It then becomes possible to restore the original image using only the fixed encoded data although the picture quality becomes lower than would have been possible if the writing had not been interrupted.
When two or more types of the encoding methods are available in the same device, it is desirable to be able to switch between them and to execute a writing method of image data advantageous according to the used encoding method. In such a case, the recording is repeatedly performed while fixing the file by the predetermined cluster unit when image data, which is hierarchically encoded, is recorded; in contrast all the encoded image data are fixed as a file and are recorded on the record medium when the image data, encoded by other encoding methods except a hierarchical encoding method, is recorded.
As a result, when the image data is hierarchically encoded, even if the writing operation is interrupted while performing the writing operation, the data which has been recorded can be left as a usable file about image data. When the image data is encoded by other encoding methods and the writing operation is interrupted, it becomes possible to prevent the defective data which cannot be reproduced from remaining as a file about the image data.
Since the disadvantage because of the death of the battery is less significant by using the above-mentioned writing method for image data, which is hierarchically encoded, it is desirable to change the threshold level to detect whether the battery is consumed and the execution timing of the detection operation according to the encoding method used. Thus, by buffering the detection condition concerning the battery consumption when a hierarchical encoding method is used, a useless warning signal can be prevented from being generated when a hierarchical encoding method is used. When other encoding methods are used, it becomes possible beforehand to prevent the problem of the interruption of writing the encoded image data, from occurring by heeding the warning signal.
The present invention can be applied also to the electronic camera which comprises the above-mentioned image recording device, and, furthermore, can be achieved as a recording medium to be able to execute the function of the above-mentioned image recording device with an executable computer.
According to the present invention, even when the writing operation of image data, which is hierarchically encoded, is interrupted by the death of the battery prior to writing all data, it becomes possible to validly use the data which has been recorded thus far as a file.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.